/*
 * @Author: MrDotYan 2564217790@qq.com
 * @Date: 2024-09-14 10:17:05
 * @LastEditors: MrDotYan 2564217790@qq.com
 * @LastEditTime: 2024-09-14 10:17:24
 * @FilePath: /webServer/src/model/email/email.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { Column, Entity } from 'typeorm';
import { DBColumns } from '../';
import { EmailSchema } from '../../schema';

@Entity('email')
export class Email extends DBColumns implements EmailSchema {
  @Column({
    type: 'varchar',
    length: 50,
    nullable: false,
    default: null,
    comment: '接收者邮箱',
  })
  receiver: string;

  @Column({
    type: 'varchar',
    length: 50,
    nullable: false,
    default: null,
    comment: '邮件标题',
  })
  title: string;

  @Column({
    type: 'varchar',
    length: 50,
    nullable: false,
    default: null,
    comment: '邮件主题',
  })
  subject: string;

  @Column({
    type: 'text',
    nullable: false,
    default: null,
    comment: '邮件内容',
  })
  context: string;

  @Column({
    type: 'json',
    nullable: false,
    default: null,
    comment: '邮件回执',
  })
  returnReceipt: string;
}
